package com.hy.example.server.web.facade;

import com.hy.example.server.common.dto.ExampleDemoDTO;
import com.hy.example.server.common.facade.ExampleDemoFacade;
import com.hy.example.server.core.service.ExampleDemoService;
import com.hy.example.shared.facade.AbstractFacadeImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping(ExampleDemoFacade.PREFIX)
public class ExampleDemoFacadeImpl extends AbstractFacadeImpl implements ExampleDemoFacade {

    @Autowired
    private ExampleDemoService exampleDemoService;

    public ExampleDemoDTO view(@PathVariable Long id) {
        return exampleDemoService.detail(id);
    }
}
